package com.furongji.education.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.furongji.common.enums.CommentTargetTypeEnum;
import com.furongji.education.domain.dto.CommentDto;
import com.furongji.education.domain.po.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.furongji.education.domain.vo.CommentVo;

/**
 * <p>
 * 通用评论表 服务类
 * </p>
 *
 * @author furongji
 * @since 2025-06-03
 */
public interface CommentService extends IService<Comment> {

    IPage<CommentVo> getCommentsByTarget(Integer current, Integer size, String targetId, CommentTargetTypeEnum targetType);

    boolean saveCommentByTarget(CommentDto commentDto) throws JsonProcessingException;
}
